package per.hnvcam.searchext.services;

import per.hnvcam.genetic.algorithm.FitnessCalculator;
import per.hnvcam.searchext.data.model.ConditionData;
import per.hnvcam.searchext.data.model.RuleData;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Vi Cam
 * Date: 26/12/2011
 * Time: 21:22
 * To change this template use File | Settings | File Templates.
 */
public interface RuleService extends FitnessCalculator, CallbackSupportService {

   List<RuleData> getAllBaseRulesData();

   List<RuleData> getAllManualRulesData();
   
   void generateBaseRules();
   
   int generateInitialRules();
   
   void removeAllBaseRules();

   void removeAllClassifyRules();
   
   double getConfidenceDegreeOf(RuleData rule);
   
   double getSupportDegreeOf(RuleData rule);
   
   List<RuleData> applyFlooringToInitialRules();
   
   void setRuleSet(List<RuleData> ruleSet);
   
   List<RuleData> generateClassifyRuleSet(List<RuleData> initialRuleSet);

   void persistClassifyRuleSet(List<RuleData> classifyRuleSet);

   List<RuleData> getClassifyRuleSet(boolean includeManualRules);

   double getCompatibilityGrade(RuleData rule, List<ConditionData> sample);

   double getRuleWeight(RuleData ruleData);

   void addManualRule(List<ConditionData> conds, String classifiedClass);

   int getSizeOfClassifyRules(boolean includeManualRules);
}
